<?php
	$lang = strtolower(Language::getShortName());

	//message
	HtmlsHelper::Message($this->data['message']);
	
	XHTML::Style("
		.btnType-5-txt {
		    color: #000000;
		    font-size: 13px;
		}	
	");
	
	XHTML::Form('', FormMethod::Post, array('id' => 'upgradeForm'));
	XHTML::InputHidden('id', HTTPContext::$session['client']['id']);
	echo "
        <table cellpadding='0' cellspacing='0' width='100%' style = 'margin-bottom: 3px; '>
          <tr class='lp1' name = 'staticRow'>
            <td align='left' class='bpad15 tpad15'><span class='c6a'>".Language::Get('Current account type').": </span></td>
            <td align='right'><span class='size14 tbold'>{$this->data['account_type']['name_'.$lang]}</span></td>
          </tr>        
          <!--
          <tr class='' name = 'staticRow'>
            <td align='left' class='bpad15 tpad15'><span class='c6a'>".Language::Get('Upgrade to').": </span></td>
            <td align='right'></td>
          </tr>
          -->
          <tr class='' name = 'inputRow' style = ''>
		    <td colspan='2' class='bpad10 dq-input-text' style = 'text-align: center; padding-top: 10px;  '>";
	
				foreach ($this->data['account_types_available'] as $accountType)
				{
					echo "<div onclick = '\$(\"#account_type_id\").val(\$(this).attr(\"name\")); \$(\"#upgradeForm\").submit(); ' id='btnSave' name = '{$accountType['id']}' class = 'btnSave' style = 'font-weight: bold; ' >".Language::Get('Upgrade account to', 'CAPITALIZE')." ".$accountType['name_'.$lang]."</div>";
					echo "<div style = 'padding-bottom: 10px; margin-bottom: 10px; background: url(/app/themes/default/img/lp1.png) repeat-x scroll center bottom transparent; '>".$accountType['description_'.$lang]."</div>";
				}
				
				XHTML::InputHidden('account_type_id', '', array('id' => 'account_type_id'));
//		    	XHTML::Select('account_type_id', $this->data['account_types_available'], $this->data[$this->name]['account_type_id'], false, array('style' => 'border: 0px; width: 235px;'));
	
	echo "	</td>
		  </tr>
        </table>
        </form>
        <!--<div id='btnSave'>".Language::Get('Upgrade', 'CAPITALIZE')."</div>-->
	";
?>

<script type="text/javascript">
	$('.btnSave').dqButton({type:5, action:"", clickType:'js', live: false});
	$('.btnType-5-left').addClass('btnType-5-left-select');	
	$('.btnType-5-center').addClass('btnType-5-center-select');	
	$('.btnType-5-right').addClass('btnType-5-right-select');	
//	$('.dq-input-text').dqInput();	
</script>